<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="theme-color">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>分享家</title>
    <link rel="stylesheet" type="text/css" href="../lib/css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../lib/css/mui.css"/>
    <link rel="stylesheet" href="../css/util.css">
    <script src="http://at.alicdn.com/t/font_371407_7omis3wrfr7tx1or.js"></script>
</head>
<link rel="stylesheet" href="../css/chat.css">
<body>
<header class="fxj-header">
    <back></back>
    <h1 class="fxj-title">聊天</h1>
</header>
<main id="main">
    <section v-for="chat of chatList">
        <p class="time">{{chat.date}}</p>
        <div class="msg-container" :class="{other:chat.who==='other',own:chat.who==='me'}">
            <div class="msg-box msg-box-left" v-if="chat.who==='me'" v-cloak>{{chat.msg}}</div>
            <div class="img-container"><img class="avatar border" :src="chat.head" @load="removeBorder($event)"></div>
            <div class="msg-box msg-box-right" v-if="chat.who==='other'" v-cloak>{{chat.msg}}</div>
        </div>
    </section>

    <footer>
        <label>
            <input type="text" @keyup="hasContent($event)" v-model="msg">
        </label>
        <button class="send" :class="{'ok':sendAble}" @click="send">发送</button>
    </footer>
</main>


<script type="text/javascript" src="../lib/js/babel-polyfill.js"></script>
<script type="text/javascript" src="../lib/js/vue.js"></script>
<script type="text/javascript" src="../lib/js/mui.js"></script>
<script type="text/javascript" src="../lib/js/jquery.js"></script>
<script type="text/javascript" src="../script/util.js"></script>

<script src="../script/chat.js"></script>
</body>
</html>